Imports System.IO

Module DirectoryInfoDemo

    Sub Main()
        Dim Root As New DirectoryInfo("C:\")

        Dim Files As FileInfo() 
        Files= Root.GetFiles("*.*")
        
        Dim Dirs As DirectoryInfo() 
        Dirs= Root.GetDirectories("*.*")

        Dim Filename As FileInfo
        For Each Filename In Files
                Console.Write(Filename.FullName)
                Console.Write(" Kich thuoc: {0} bytes", Filename.Length)
                Console.WriteLine(" Lan cuoi: {0}", Filename.LastAccessTime)
        Next

        Dim DirectoryName As DirectoryInfo

        For Each DirectoryName In Dirs
                Console.Write(DirectoryName.FullName)
                Console.Write(" Co {0} files ", DirectoryName.GetFiles().Length)
                Console.WriteLine(" va {0} thu muc con ", DirectoryName.GetDirectories().Length)
        Next
    End Sub

End Module
